package com.imust.springbootproject.dao;

import com.imust.springbootproject.po.Tag;
import org.springframework.data.domain.Pageable;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface TagRepository extends JpaRepository<Tag, Long> {
    public abstract Tag findByName(String name);
    @Query("select t from Tag t")
    public abstract List<Tag> findTop(Pageable pageable);
}
